package net.yla.smartbus.module.ba.right.admin.service;

import com.alibaba.fastjson.JSONObject;
import net.yla.smartbus.core.base.PageBean;
import net.yla.smartbus.module.ba.right.admin.dto.AdminDTO;
import net.yla.smartbus.module.ba.right.admin.entity.AdminDO;
import net.yla.smartbus.module.ba.right.admin.query.*;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @Date: 2020-08-17 9:58
 * @Author: Being Nobody
 * @Version: 1.0
 */
public interface AdminService {


    int deleteByPrimaryKey(Integer adminId);

    int insert(AdminDO record);

    int insertSelective(AdminDO record);

    AdminDO selectByPrimaryKey(Integer adminId);

    int updateByPrimaryKeySelective(AdminDO record);

    int updateByPrimaryKey(AdminDO record);

    PageBean<JSONObject> admin(AdminQuery query);

    int saveSelective(SaveQuery query);

    AdminDO selectByLoginId(String loginid);

    int count(AdminCount query);

    AdminDTO record(AdminQuery query);

    int ipOfCount(IPCount count);

    List<JSONObject> ipOfQuery(IPQuery query);

    int logOfCount(LogCount query);

    PageBean<JSONObject> logOfQuery(LogQuery query);

    AdminDTO admin(Integer id);

    int delAdmin(Integer id);

    //批量删除账号信息
    int deleteByList(List<Integer> adminIds);

    JSONObject ipOfView(Integer traceId);

    JSONObject logOfView(Integer logId);

    //导出账号信息
    void export(AdminQuery query, HttpServletResponse response);

    //删除账号日志信息
    int deleteAdminLog(Integer logId);

    //批量删除账号日志信息
    int deleteByLogList(List<Integer> ids);

    //查询未绑定其他角色的全部账号
    List<JSONObject> getAdminNoRoleInfo(Integer id);
}
